<?php

namespace common\models\datas;

use Yii;

/**
 * This is the model class for table "{{%web_sales_type}}".
 *
 * @property integer $id
 * @property string $name
 * @property string $description
 * @property integer $enabled
 */
class WebSalesType extends \common\components\bases\BaseModel
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%web_sales_type}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['name'], 'required'],
            [['enabled'], 'integer'],
            [['name'], 'string', 'max' => 50],
            [['description'], 'string', 'max' => 200]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('common', '自动编号'),
            'name' => Yii::t('common', '类型名称'),
            'description' => Yii::t('common', '类型描述'),
            'enabled' => Yii::t('common', '是否开启'),
        ];
    }
}
